public class Node{
    public int value;
    public Node left;
    public Node right;
    public Node(int data){
        this.value=data;
    }
}


public void inOrderUnRecur(Node head){
    if(head!=null){
        Stack<Node> stack=new Stack<>();
        while(!stack.isEmpty()&&head!=null){
            stack.push(head);
            head=head.left;
        }
        else{
            head=stack.pop();
            System.out.print(head.value+" ")
            head=head.right;
        }
    }   
}




